package com.joy.eduservice.client;

import com.joy.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author 焦恩越
 * @create 2021-12-05-16:32
 */
@Component//交给spring管理
@FeignClient(value = "service-vod",fallback = VodFileDegradeFeignClient.class)//要调用的服务的名字
public interface VodClient {

    //定义调用的方法路径
    @DeleteMapping("/eduvod/video/removeAlyiVideo/{id}")
    public R removeAlyiVideo(@PathVariable("id") String id);//此时@PathVariable("id")一定要指定名称

    //定义删除多个视频的方法
    //删除多个视频的方法
    //参数是多个id值
    @DeleteMapping("/eduvod/video/deleteBatch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
